/*
 * Copyright (c) 2022 hpmicro
 *
 * SPDX-License-Identifier: BSD-3-Clause
 *
 */
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include "boot_user.h"
#include "ota_api.h"
#include "lwip.h"

int main(void)
{
    int ret = 0;
    int bootmode = 0;
    uint32_t app_addr = 0;
    bootuser_board_init();
    printf("boot user in\r\n");

    bootmode = bootuser_verfiy_goto_app(true, true);
    printf("boot mode:%d\n", bootmode);
    if (bootmode >= 0)
    {
        ota_board_app_jump((uint8_t)bootmode);
    }
    
    printf("Start bootuser mode of enet ota\r\n");

    ota_board_flash_init();
    lwip_bootuser();

    while (1)
    {
        
    }
    return 0;
}


